home *** CD-ROM | disk | FTP | other *** search
- Path: pegasus.montclair.edu!triant
- From: triant@pegasus.montclair.edu (Constantine Triantafillou)
- Newsgroups: comp.lang.c
- Subject: Heeelp: Interfacing Pascal object code with C. How?
- Date: 27 Feb 1996 14:33:00 -0500
- Organization: Montclair State University
- Message-ID: <triant.825447166@pegasus.montclair.edu>
- NNTP-Posting-Host: pegasus.montclair.edu
- Keywords: 1
- X-Newsreader: NN version 6.5.0 #68 (NOV)
-
- Hi!
-
- I am doing a programming project, developing a very simple imaginery
- assembler:
-
- However I have the following problem.
-
- I am trying to find out how can I interface an object file
- with a C program. Note that the object file is generated
- by a Pascal compiler, and it should be called by modules
- in a C program. The object file creates, initializes and writes into
- a hash table which !!*should not be erased*!! after the object file has
- finished execution. That is the hash table should be "global".
-
- The C modules should be able to pass arguments to that object file!
-
- I've never done this before so I need help.
- The Pascal code (and thus the object file) that generates the hash table is
- by itself a complete program with its own modules.
- Only the object file knows about the hash table. Not the C modules.
-
- Arguments that should be passed to the object file by a C function (module):
-
- int Location_Counter, (Input parameter) char Label, (Input parameter)
- int *flag_pointer (Output parameter)
-
- Do I have to generate an assembler version of the Pascal program, then
- edit it to make it capable of accepting arguments, and be able to
- access the hash table without destroyng it after finishing its execution!
- How I do that. In my school we use SUN cc, gcc, and pc compilers.
- Please send me E-mail.
-
- Thank You A Million!
-
- Constantine Triantafillou (novice programmer)
-